<!doctype html>
<html lang="en">
<head>
    <title>剪贴板</title>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script>
        window.hdjs = {};
        window.hdjs.base = '/hdjs';
        window.hdjs.uploader = 'php/uploader.php?';
        window.hdjs.filesLists = 'php/filesLists.php?';
    </script>
    <script src="../dist/static/requirejs/require.js"></script>
    <script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">

<input class="form-control" name="icon" placeholder="点击文本框选择表情">
<script>
    require(['hdjs'], function (hdjs) {
        $(function () {
            hdjs.emotion({
                //点击的元素，可以为任何元素触发
                btn: "[name='icon']",
                //选中图标后填入的文本框
                input: "[name='icon']",
                //选择图标后执行的回调函数
                callback: function () {
                    console.log('选择表情后的执行的回调函数');
                }
            });
        });
    });
</script>
</body>
</html>